function AjaxOperator(){
    this.sendGet=function(url,fndone,fnfail){
        $.ajax({
            type:"GET",
            url:url,
            dataType:"json"
        }).done(function(data){
            if(fndone){
                fndone(data);
            }
        }).fail(function(error){
            if(fnfail){
                fnfail(error);
            }
        });
    }
    
    this.sendPost=function(url, paramObj, fndone, fnfail){
    	$.ajax({
            type:"POST",
            url:url,
            data:JSON.stringify(paramObj),
            dataType:"json",
            contentType:"application/json"
        }).done(function(data){
            if(fndone){
                fndone(data);
            }
        }).fail(function(error){
            if(fnfail){
                fnfail(error);
            }
        });
    }
    
    this.sendDelete=function(url,fndone,fnfail){
        $.ajax({
            type:"DELETE",
            url:url,
            dataType:"json"
        }).done(function(data){
             if(fndone){
                fndone(data);
            }
        }).fail(function(error){
             if(fnfail){
                fnfail(error);
            }
        });
    }
}